package com.cjy.linkedList;

import java.util.Stack;

/**
 * @Author cjy
 * @Date 2022/6/28 23:31
 * @Version 1.0
 */
public class TestStack {
    public static void main(String[] args) {
        Stack<String> stack = new Stack<>();
        stack.add("jack");
        stack.add("tom");
        stack.add("sal");
        // 出栈
        while (stack.size()>0){
            System.out.println(stack.pop());
        }

    }
}
